﻿use housing 
go
IF  EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].view_apply_SubsidyRecord')) DROP VIEW [dbo].view_apply_SubsidyRecord
go
Create view view_apply_SubsidyRecord
as 
SELECT     dbo.Apply.*, dbo.SubsidyRecord.adj_id, dbo.SubsidyRecord.adj_longid, dbo.SubsidyRecord.adj_checked, dbo.SubsidyRecord.adj_reason, 
                      dbo.SubsidyRecord.adj_noid, dbo.SubsidyRecord.adj_date, dbo.SubsidyRecord.adj_remark, dbo.SubsidyRecord.adj_stoptime, 
                      dbo.SubsidyRecord.adj_starttime, dbo.SubsidyRecord.adj_iscontinue, dbo.SubsidyRecord.adj_nowarea, dbo.SubsidyRecord.adj_moneychange, 
                      dbo.SubsidyRecord.adj_nowmoney
FROM         dbo.Apply INNER JOIN
                      dbo.SubsidyRecord ON dbo.Apply.apply_id = dbo.SubsidyRecord.applyid